package com.etc.ssm.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpSession;
import javax.websocket.Session;
import java.util.Date;

@Controller
public class ThymeController {

    @GetMapping("api/th01")
    public String th01(HttpSession session) {
        session.setAttribute("name", "thymeleaf");
        session.setAttribute("birthdate",new Date());
        return "th01";
    }
}
